package gold.digger;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC672 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public int flipLights(int n, int m) {
            n = Math.min(n, 3);
            if (m == 0) return 1;
            if (m == 1) return n == 1 ? 2 : n == 2 ? 3 : 4;
            if (m == 2) return n == 1 ? 2 : n == 2 ? 4 : 7;
            return n == 1 ? 2 : n == 2 ? 4 : 8;
        }
    }


    public void run() {
        Solution solution = new Solution();
        List<Integer> list = new ArrayList<>();
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC672 an = new LC672();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
